🚀 Welcome to SlopBuster! - #2
Open
slopbuster[bot] wants to merge 1 commit into
Open
Conversation
antoinetoussaint-byte
added a commit
that referenced
this pull request
Aug 25, 2026
…-safe (#14) Addresses review findings on the optional gRPC server. #1 (main.py): the grpc server was imported at module top level, so importing src.main required the generated stubs. Runtime.Init runs GenerateOpenAPI, which imports src.main *before* Sync generates those stubs (and they are git-ignored, so a fresh clone has none) — Init failed with ModuleNotFoundError. The import now lives inside the startup handler; OpenAPI generation never fires startup, so the module imports cleanly without stubs. #2 (proto location): the proto was scaffolded at code/proto/api.proto, but core's LoadEndpoints re-derives the gRPC contract from standards.ProtoPath (proto/api.proto at the service root) and the manifest stores no proto bytes. The endpoint therefore reloaded with zero RPCs and dependent services could not generate clients. The proto now lives at the service-root standard path (Buf and grpcEndpoint read it there), and defaultProtoPath is bound to standards.ProtoPath so it can never drift again. #3 (server.py): add_insecure_port returns 0 instead of raising when a port can't be bound, so the server would "start" listening on nothing while FastAPI stayed healthy. It now raises, which also fails the pod's HTTP readiness probe via the shared lifespan (covers the gRPC-readiness gap). Tests: added a reload regression test asserting the gRPC endpoint keeps its RPCs after LoadEndpoints (would have caught #2), and a check that src.rpc is never imported at module top level (would have caught #1). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
antoinetoussaint-byte
added a commit
that referenced
this pull request
Aug 26, 2026
* feat: add optional Python gRPC server and proto scaffolding (#14) Add an opt-in, service-owned grpc.aio listener to the generated FastAPI service. It runs in the same process as the FastAPI app (booted from the lifespan), on its own internal port, and stays entirely off by default so existing REST-only services and their generated layout are unchanged. - grpc-server settings (enabled/proto) + a creation question, disabled by default. - Scaffold proto/api.proto, Buf config, a grpc.aio server, a gRPC health service, and a user-owned servicer seam when enabled. - Regenerate the Python protobuf + gRPC stubs from the proto during Sync. - Create/load a Codefly gRPC endpoint in Builder and Runtime; wire native, container, and Kubernetes port mappings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: place gRPC proto at core-standard path and make grpc boot import-safe (#14) Addresses review findings on the optional gRPC server. #1 (main.py): the grpc server was imported at module top level, so importing src.main required the generated stubs. Runtime.Init runs GenerateOpenAPI, which imports src.main *before* Sync generates those stubs (and they are git-ignored, so a fresh clone has none) — Init failed with ModuleNotFoundError. The import now lives inside the startup handler; OpenAPI generation never fires startup, so the module imports cleanly without stubs. #2 (proto location): the proto was scaffolded at code/proto/api.proto, but core's LoadEndpoints re-derives the gRPC contract from standards.ProtoPath (proto/api.proto at the service root) and the manifest stores no proto bytes. The endpoint therefore reloaded with zero RPCs and dependent services could not generate clients. The proto now lives at the service-root standard path (Buf and grpcEndpoint read it there), and defaultProtoPath is bound to standards.ProtoPath so it can never drift again. #3 (server.py): add_insecure_port returns 0 instead of raising when a port can't be bound, so the server would "start" listening on nothing while FastAPI stayed healthy. It now raises, which also fails the pod's HTTP readiness probe via the shared lifespan (covers the gRPC-readiness gap). Tests: added a reload regression test asserting the gRPC endpoint keeps its RPCs after LoadEndpoints (would have caught #2), and a check that src.rpc is never imported at module top level (would have caught #1). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Welcome to SlopBuster! 🎉
Thanks for installing Connectory on codefly-dev/service-python-fastapi!
✨ What happens now?
Every Pull Request gets an instant AI code review with:
This PR will be reviewed too! Check the comments below to see it in action.
🚀 Get Started
3 free reviews/month — no credit card required.
👉 Sign in to access your dashboard
From your dashboard you can:
This PR adds a
.connectorymarker file. Feel free to merge or close it.Note
Add Connectory AI Code Review welcome file to the repository
Adds WELCOME.md introducing Connectory AI Code Review and linking to the dashboard.
Macroscope summarized 605cdea.